package com.meal.base.test.DesignMode.singleton;

/**
 * @program: meal->LasySyncMode
 * @description: 懒汉模式
 * @author: yangzhanghui
 * @create: 2020-04-03 16:15
 **/
public class LasySyncMode {

    private static LasySyncMode lasySyncMode;//这里不进行实例化

    private LasySyncMode(){}

    public static synchronized LasySyncMode getInstance() {
        if (lasySyncMode == null) {//如果无神才造神
            lasySyncMode = new LasySyncMode();
        }
        return lasySyncMode;
    }
}
